package org.blade.personal.mode;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;

import org.blade.personal.component.listener.EntityListener;

/**
 * 基类实体
 * @author blade
 * @version
 */
@MappedSuperclass
@EntityListeners({EntityListener.class})
public class BaseEntity<ID> {
	
	@Id
	@Column(name = "id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	protected ID id;
	
	@Column(name="uuid")
	protected String uuid;
	
	@Column(name="created_date")
	protected Date createdDate;
	
	@Column(name="modify_date")
	protected Date modifyDate;

	/**
	 * 
	 */
	@Transient
	public boolean useQueryStringLike = false;
	
	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public Date getModifyDate() {
		return modifyDate;
	}

	public void setModifyDate(Date modifyDate) {
		this.modifyDate = modifyDate;
	}

	public ID getId() {
		return id;
	}

	public void setId(ID id) {
		this.id = id;
	}
	
}
